<template>
  <div>
    登录跳转
  </div>
</template>

<script>
import { getToken, setToken, removeToken } from '@/utils/auth'

export default {
  name: 'Login1',
  data() {

    return {
      token: undefined,
      redirect: undefined
    }
  },
  watch: {
      
  },
  created() {
    // window.addEventListener('storage', this.afterQRScan)
  //   console.log('created');
  },
  mounted() {
     this.token = this.$route.query.token;

    
    // console.log(this.token);
     this.$store.dispatch('user/loginm', this.token)
            .then(() => {
        //      console.log('rdict :'+this.redirect);
              this.$router.push('/table/run')
              this.loading = false
            })
            .catch(() => {
         //     console.log('exception.....');
              this.loading = false
            })

     //setToken(this.token)
     //this.$router.push('/table/parkfield')
  },
  destroyed() {
    // window.removeEventListener('storage', this.afterQRScan)
  },
  methods: {

   
  }
}
</script>


